package com.kaifamiao.Practice;

public class P001 {
    public static void main(String[] args) {
        //输出100以内的质数并求和。
        int num = 0;
        boolean t = true;
        for (int i = 2; i <= 100; i++) {
            for (int j = 2; j < i; j++) {
                if (i % j == 0 ) {
                    t = false;
                }
                }
            if(t){
                System.out.println(i);
                num += i;
            }
            t =true;
        }
        System.out.println(num);
    }
}
